@import "animation";

.cm-upload{
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 2px;
  background: whitesmoke;
  position: relative;
  overflow: hidden;
  min-width: 161px;
  height: 30px;
  line-height: 30px;
  vertical-align: middle;

  .cm-upload-pick-helper{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    opacity: 0;
    filter: alpha(opacity=0);
    font-size: 100px;
  }

  .cm-upload-fileName{
    width: 100%;
    height: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  i{
    cursor: pointer;
    position: absolute;
    right: 8px;
    top: 6px;
    &.fa-check{
      color: #009900;
    }
    &.fa-exclamation-triangle{
      color: #990000;
    }
  }

  .cm-upload-progress{
    position: absolute;
    height: 2px;
    width: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    .cm-progress-bar{
      position: absolute;
      width: 0;
      height: 100%;
      background: #00a2d4;
      .transition(width 0.5s)
    }
  }

  .cm-upload-pick-btn{
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 28px;
    cursor: pointer;
    background: white;
    padding: 0 8px;
    line-height: 28px;
  }

  .webuploader-element-invisible {
    position: absolute !important;
    clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
    clip: rect(1px,1px,1px,1px);
  }
  .webuploader-pick {
    position: relative;
    width: 100%;
    height: 100%;
  }

  .webuploader-pick-disable {
    opacity: 0.6;
    pointer-events:none;
  }
}

.invalid {
  .cm-upload{
    border-color: #E05B5B;
  }
}